H5x.component("activity",[],function(opts){   
    this.container =  opts.container;
    this.use("render");
    this.use("dai");
    this.use("emitter");

    //this.applistdai = this.dai.create("appsetting"); 
    this.init(); 

},{
    init:function(){
        this.render("tp-activity-main");
        //var self = this;

        $("#panel-activity").make("activity.activity");

        $("#activity-tabs a").on('show.bs.tab', function (e) {
            var tabid = $(this).attr("href");
            if(tabid.indexOf("-activity")>0){
                $("#panel-activity").make("activity.activity");
            }else{
                $("#panel-apply").make("activity.apply");
            }
            //debugger;
            //e.target // newly activated tab
            //e.relatedTarget // previous active tab`
        });
    },

});